package code._13io.bytestream.in;

import java.io.FileInputStream;
import java.io.IOException;

public class Demo2 {
    public static void main(String[] args) throws IOException {
        FileInputStream in = new FileInputStream("fileTest\\a.txt");
        byte[] bytes = new byte[4];
        int readCount = in.read(bytes);
        System.out.println("readCount = " + readCount);
        System.out.println(new String(bytes,0,readCount));

        int readCount2=in.read(bytes);
        System.out.println("readCount2 = " + readCount2);
        System.out.println(new String(bytes,0,readCount2));

        in.close();
    }
}
